﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SiteWithControlAccess.Master"
    Inherits="ProjetoComperio.SystemFramework.Web.ComperioViewPage<IQueryable<Event>>" %>

<%@ Import Namespace="ProjetoComperio.DataLayer.Entities" %>
<%@ Import Namespace="Telerik.Web.Mvc.UI" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Eventos
    </h2>
    <div class="Grid">
        <%= Html.Grid(ViewData.Model).Columns(
           column => 
           {  
            column.For(x => x.Title).Named("Título");
            column.For(x => x.StartDate).Named("Data de Início");
            column.For(x => x.EndDate).Named("Data de Término");
            column.For(x => Html.ActionLink("Ver", "Visualize", new { id = URLEncrypt.EncryptToString(x.ContributionID.ToString()) })
               ).DoNotEncode().Attributes(x => new Hash(style => "font-weight:bold"));

            column.For(x => x.IsActive ? "Sim" : "Não").Named("Ativa?");
               
           }).Attributes(Style =>  "width:100%").Empty("Não existem eventos cadastrados.")
           
        %>
    </div>
    <br />
    <br />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="head" runat="server">
</asp:Content>
